<?php

namespace app\common\validate;

use think\Validate;

class Permission extends Validate
{
    protected $rule = [
        ['ps_name', 'require|unique:permission', '请输入用户名|权限名称已经存在'],
        ['ps_pid', 'require', '请选择父类id']
    ];
    protected $scene = [
        'add' => [
            'ps_name', 'ps_pid'
        ],
    ];
}